package com.syh.jn.scm.domain.upstream.entity.finance;

import cn.redscarf.commons.util.bean.ExtBeanUtils;
import cn.redscarf.commons.util.other.ExtAssert;
import cn.redscarf.commons.util.validator.ValidationUtils;
import com.syh.core.ddd.domain.AbstractSimpleAggregate;
import com.syh.jn.scm.dto.upstream.finance.upStatementAccountBillCart.UpStatementAccountBillCartDto;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * Created by soci.song on 2018/12/11.
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class UpStatementAccountBillCart extends AbstractSimpleAggregate<Long> {

  public UpStatementAccountBillCart(UpStatementAccountBillCartDto dto) {
    ExtAssert.notNull(dto,"对象为空");
    ValidationUtils.validate(dto);
    ExtBeanUtils.copyProperties(dto,this);
  }
  /**
   * 归属端id
   */
  private Long businessEntityId;
  /**
   * 客户类型 0：上游 1：下游 2：物流
   */
  private Short customerType;
  /**
   * 客户id
   */
  private Long customerId;
  /**
   * /**
   * 来源单类型 0 销售单 1 销售退货单 2采购单 4 采购退货单 5 费用单 6 收入单
   */
  private Short sourceType;
  /**
   * 来源单号
   */
  private String sourceCode;
  /**
   * 来源单id
   */
  private Long sourceId;
  /**
   * 录单人id
   */
  private Long brokerageId;

}
